package kr.hkit.androidcomplete02.fragment;

import kr.hkit.androidcomplete02.R;
import android.app.Activity;
import android.app.DialogFragment;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;
import android.widget.Toast;

public class CheckDialogFrgEx extends Activity implements CheckDialogFragment.NoticeDialogListener{

	TextView tv;
	
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.dialogfragment);
		tv = (TextView) findViewById(R.id.tv1);
	}
	
	public void mOnClick(View v) {
		DialogFragment newFragment = new CheckDialogFragment();
		newFragment.show(getFragmentManager(), "Dialog");
	}
	
	
	
	@Override
	public void onDialogClick(DialogFragment dialog, String res) {
		
		tv.setText("선택한 음식 = " + res);
		Toast.makeText(this, "선택완료", Toast.LENGTH_LONG).show();
	}

	
	
}
